/*页面跳转传参*/
$('#State1').click(function(){
	localStorage.setItem('state',1);
	localStorage.setItem('stateChild',null);
})
$('#State2').click(function(){
	localStorage.setItem('stateChild',null);
})
//右侧辅助
$('.m-contact_fr>ul>li>div.Hhover').hover(
	function(){
	  var $this=$(this);
	  $this.next().show();
	},
	function(){
		var $this=$(this);
		$this.next().hide();
	}
);
window.addEventListener("scroll",function(){
	// console.log("from header");
	var scrollTop=
		document.documentElement.scrollTop
		+document.body.scrollTop;
	var headerTop=
		$("#RRight");
	//如果scrollTop>=689.4
	if(scrollTop>=689.4)
	//显示
		headerTop.show();
	else//否则
	//隐藏
		headerTop.hide();
});

//两个轮播切换效果
var mySwiper,Swiper;
function SWIPER(old,name){
	old= new Swiper (name, {
		autoplay:true,//自动播放
		autoplayDisableOnInteraction:false,//--在点击之后可以继续实现轮播
		speed: 500,//转换间隙
		direction:"horizontal",//横向滑动
		loop: true,//无限轮播
		pagination:".swiper-pagination",//*分页器
		//paginationClickable :true,
		observer:true,
		observeParents:true,
		///////////
		// 如果需要前进后退按钮
		navigation: {
			nextEl: '.swiper-button-next',
			prevEl: '.swiper-button-prev',
		}
	})
	$(name).hover(
		function(){
			//console.log('进入-停止');
			old.autoplay.stop();
		},
		function(){
			//console.log('出来+开始');
			old.autoplay.start();
		}
	)
}
SWIPER(mySwiper,'#swiper1');
SWIPER(Swiper,'#swiper2');
